<?php
/* 分类模型
* @Author: Jerry-chen
* @Date:   2014-07-08 11:47:03
* @Last Modified time: 2014-07-23 22:33:46
* @Last Modified by: Jerry-chen<uranusbill@163.com>
* @ Copyright (c) 2014 http://www.cooldreamer.com All rightsreserved.
*/

class CategoryModel extends Model
{
	//指定表
	public $table = 'category';
	/**
	 * [add_ 添加数据]
	 */
	public function add_()
	{
		return $this->add();
	}
	/**
	 * [del_ 删除]
	 * @return [type] [description]
	 */
	public function del_($where){
		$this->where($where)->del();
	}
	/**
	 * [get_all 获得所有]
	 * @return [type] [description]
	 */
	public function get_all($where=null,$field=null)
	{
		return $this->where($where)->field($field)->all();

	}
	/**
	 * [get_one 获得一条数据]
	 * @return [type] [description]
	 */
	public function get_one($where=null,$field=null)
	{
		return $this->where($where)->field($field)->find();
	}

}

?>
